<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>简单加法器案例</title>
    <script>
        var num1 = prompt('请输入第1个数');
        var num2 = prompt('请输入第2个数');
        var result = parseFloat(num1) - parseFloat(num2);
        alert('计算结果是:' + result);
    </script>
</head>
<body>

</body>
</html>